var mongoose=require("mongoose");
mongoose.Promise = global.Promise; 
var db=mongoose.createConnection("mongodb://wopelo:mongo@localhost:27017/testDB");
var movieSchema=require("../schemas/movie.js");
db.on("error",function(){
	console.log("nodeWeb连接错误");
});
db.on("open",function(){
	console.log("nodeWeb被打开");
});
var Movie=db.model("Movie",movieSchema);

module.exports=Movie;